home *** CD-ROM | disk | FTP | other *** search
- // Copyright (c)1995 Ray Dream, Inc. All Rights Reserved.
- /*$Id: COMFog.h 1.1 1996/07/18 23:15:54 Damien Exp $*/
-
- //
- // COM Example of an Atmospheric Shader
- //
-
- #ifndef __COMFOG__
- #define __COMFOG__
-
- #ifndef __I3DEXAB__
- #include "I3DExAB.h"
- #endif
-
- // define the Atmos CLSID
-
- // 61879E61-7EFA-101C-8BFC-F629D50D262B
- DEFINE_GUID(CLSID_Atmos, 0x61879E61L, 0x7EFA, 0x101C, 0x8B, 0xFC, 0xF6, 0x29, 0xD5, 0x0D, 0x26, 0x2B);
-
-
-
- typedef struct AtmosData {
- COLOR3D fColor; // "Color" of the fog
- NUM3D fZmin; // Minimum altitude of the fog
- NUM3D fZmax; // Maximum altitude of the fog
- NUM3D fVisibility; // Distance of Visibility
- } AtmosData;
-
-
- // Atmos Object :
- #undef INTERFACE
- #define INTERFACE Atmos
- class Atmos : public I3DExAtmosphericShader {
- public :
- Atmos();
- ~Atmos();
-
- // IUnknown Interface :
- STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
- STDMETHODIMP_(ULONG) AddRef(THIS);
- STDMETHODIMP_(ULONG) Release(THIS);
-
- // I3DExtension method :
- STDMETHODIMP_(I3DExtension*) Clone(THIS);
- STDMETHODIMP ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);
-
- // I3DExDataExchanger methods :
- STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
- STDMETHODIMP_(void*) GetExtensionDataBuffer(THIS);
- STDMETHODIMP ExtensionDataChanged(THIS);
- STDMETHODIMP HandleEvent(THIS_ ULONG sourceID);
- STDMETHODIMP_(short) GetResID(THIS);
-
- // I3DExAtmosphericShader methods
- STDMETHODIMP SegmentFilter(THIS_ VECTOR3D* beg, VECTOR3D* end, COLOR3D* filterOut);
- STDMETHODIMP DirectionFilter(THIS_ VECTOR3D* origin, VECTOR3D* direction, COLOR3D* filterOut);
-
- private :
- ULONG fCRef; // reference Counter
- AtmosData fData; // Atmospheric Data
- };
-
-
- #endif
-